package com.skt.domain.PO;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 服装持久化对象（PO）
 */
@Data
@Accessors(chain = true)
@TableName("costume")
@Schema(description = "服装实体")
public class Costume {

    @Schema(description = "主键ID", example = "1")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "所属商家ID", example = "1001")
    @TableField("merchant_id")
    private Long merchantId;

    @Schema(description = "服装名称", example = "汉服-唐制齐胸襦裙")
    @TableField("name")
    private String name;

    @Schema(description = "类别：古装/现代/民族/舞台特效等", example = "古装")
    @TableField("category")
    private String category;

    @Schema(description = "尺码：S/M/L/XL/定制等", example = "M")
    @TableField("size")
    private String size;

    @Schema(description = "颜色", example = "红色")
    @TableField("color")
    private String color;

    @Schema(description = "品牌/来源", example = "华服世家")
    @TableField("brand")
    private String brand;

    @Schema(description = "购入日期", example = "2024-01-15")
    @TableField("purchase_date")
    private LocalDate purchaseDate;

    @Schema(description = "购入价格（元）", example = "299.00")
    @TableField("price")
    private BigDecimal price;

    @Schema(description = "库存数量（可租赁数量）", example = "10")
    @TableField("stock")
    private Integer stock = 0;

    @Schema(description = "日租金（元）", example = "50.00")
    @TableField("rental_price")
    private BigDecimal rentalPrice;

    @Schema(description = "商品状态：0-待审核 1-审核通过 2-审核驳回 3-已上架 4-已下架", example = "1")
    @TableField("status")
    private Byte status = 1;

    @Schema(description = "描述（材质、特点等）", example = "丝绸材质，手工刺绣，适合拍照和演出")
    @TableField("description")
    private String description;

    @Schema(description = "图片URL", example = "https://example.com/images/costume1.jpg")
    @TableField("image_url")
    private String imageUrl;

    @Schema(description = "创建时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}